// CoalMinePanel.cpp : implementation file
//

#include "stdafx.h"
#include "kwclientcore.h"
#include "CoalMinePanel.h"
#include "TabulationSurface.h"
#include "RTCurveDiagramSurface.h"
#include "HistogramSurface.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCoalMinePanel

CCoalMinePanel::CCoalMinePanel(long nCoalMineId)
{
  m_nPanelType = PT_COALMINE;
  m_nCoalMineId = nCoalMineId;
  m_ColorScheme.m_crCaption = RGB(32, 32, 127);
  m_ColorScheme.m_crGradientCaption = RGB(160, 160, 255);
  m_ColorScheme.m_nActiveLabelBmpId = IDB_BITMAP_SELECTEDBLUELABEL;
  m_ColorScheme.m_nInactiveLabelBmpId = IDB_BITMAP_UNSELECTEDBLUELABEL;
}

CCoalMinePanel::~CCoalMinePanel()
{

}


BEGIN_MESSAGE_MAP(CCoalMinePanel, CBasePanel)
	//{{AFX_MSG_MAP(CCoalMinePanel)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CCoalMinePanel message handlers

void CCoalMinePanel::CreateSurfaces()
{
  bool bSuccess;

  CTabulationSurface * pTabulationSurface = new CTabulationSurface(this);
  bSuccess = pTabulationSurface->Create(this);
  ASSERT(bSuccess);
  AddSurface(pTabulationSurface);

  CHistogramSurface * pHistogramSurface = new CHistogramSurface(this);
  bSuccess = pHistogramSurface->Create(this);
  ASSERT(bSuccess);
  AddSurface(pHistogramSurface);

  CRTCurveDiagramSurface * pRTCurveDiagramSurface = new CRTCurveDiagramSurface(this);
  bSuccess = pRTCurveDiagramSurface->Create(this);
  ASSERT(bSuccess);
  AddSurface(pRTCurveDiagramSurface);

  ActivateSurface(pTabulationSurface);
}

void CCoalMinePanel::Paint(CDC& dc)
{

}

void CCoalMinePanel::GetMinMaxInfo(MINMAXINFO FAR* lpMMI)
{
  CPoint sizeScreen(GetSystemMetrics(SM_CXFULLSCREEN), GetSystemMetrics(SM_CYFULLSCREEN)+GetSystemMetrics(SM_CYCAPTION));
  CPoint sizeFrame(GetSystemMetrics(SM_CXSIZEFRAME), GetSystemMetrics(SM_CYSIZEFRAME));
  lpMMI->ptMaxSize = CPoint(sizeScreen.x+sizeFrame.x*2, sizeScreen.y+sizeFrame.y*2);
  lpMMI->ptMaxTrackSize = lpMMI->ptMaxSize;
  lpMMI->ptMinTrackSize =  CPoint(640, 300); // CPoint(480, 300);
}
